package cn.usian.jyzx.product.controller;

import cn.usian.jyzx.model.constant.Constant;
import cn.usian.jyzx.model.entity.product.Brand;
import cn.usian.jyzx.model.vo.common.Result;
import cn.usian.jyzx.model.vo.common.ResultCodeEnum;
import cn.usian.jyzx.product.service.BrandService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("api/product")
@Tag(name = "品牌相关的接口")
public class BrandController {
    @Autowired
    BrandService brandService;
    @Autowired
    RedisTemplate redisTemplate;
@Operation(summary = "查询所有品牌")
    @GetMapping("brand/findAll")
    public Result<List<Brand>> findall(){
            List<Brand> brandList = brandService.findall();
            return Result.build(brandList, ResultCodeEnum.SUCCESS);
    }
}
